// src/stores/searchStore.js
import { ref } from "vue";
import { defineStore } from "pinia";

export const useSearchStore = defineStore(
    "search",
    () => {
        const searchKeyword = ref("");
        const setSearchKeyword = (keyword) => {
            searchKeyword.value = keyword;
        };
        return { searchKeyword, setSearchKeyword };
    }, {
        persist: true, // 启用持久化存储
    }
);